package Lab5.Monster;

import Lab5.Monster.Monster;

public class Troll extends Monster {
    public Troll(String name) {
        super(name);
        try {
            if (name.equals("Saul")   || name.equals("Salomon")){
                throw new Exception();
            }
        }catch (Exception e){
            System.out.printf("Can not name the Troll %s, Setting the default name: Detritus\n",name);
            setName("Detritus");
        }
    }
}
